# -*- coding: utf-8 -*- 
#
# Description:
#
#  Definiton
#
#
#
# Changes:
#
# 2012-01-10
# Initial Commit
#
#
# Copyright 2010-2012, WyDev Team.
# Author: Polo35 (polo35580@hotmail.fr)
#
# Licenced under Academic Free License version 3.0
# Review WyGui README & LICENSE files for further details.

nname: 156
n 156(None)[return None
]:
	i: 148(), 155()
	o: 

nname: 155
n 155(None)[]:
	i: 72(f)
	o: 156()

nname: 148
n 148(None)[buttons[0].connect(confirm_action, *confirm_args)
]:
	i: 121(t), 141()
	o: 156()

nname: 141
n 141(None)[]:
	i: 121(f)
	o: 148()

nname: 121
n 121(confirm_args)[]:
	i: 72(t)
	o: 141(f), 148(t)

nname: 72
n 72(confirm_action)[self._text = text
self.buttons = buttons
self._reset_selection()
self.eventhandler = ButtonListEventHandler(self)
]:
	i: 25(), 71()
	o: 121(t), 155(f)

nname: 71
n 71(None)[]:
	i: 0(f)
	o: 72()

nname: 25
n 25(None)[buttons = [Button(_('Yes'), True), Button(_('No'), False)]
]:
	i: 0(t)
	o: 72()

nname: 0
n 0(buttons is None)[Window.__init__(self)
]:
	i: 
	o: 25(t), 71(f)

nname: 156
n 156(None)[return None
]:
	i: 121(), 0(f)
	o: 

nname: 121
n 121(None)[if not confirm_args:
	pass
buttons[0].connect(confirm_action, *confirm_args)
]:
	i: 0(t)
	o: 156()

nname: 0
n 0(confirm_action)[Window.__init__(self)
if buttons is None:
	buttons = [Button(_('Yes'), True), Button(_('No'), False)]
self._text = text
self.buttons = buttons
self._reset_selection()
self.eventhandler = ButtonListEventHandler(self)
]:
	i: 
	o: 121(t), 156(f)

nname: 0
n 0(None)[Window.__init__(self)
if buttons is None:
	buttons = [Button(_('Yes'), True), Button(_('No'), False)]
self._text = text
self.buttons = buttons
self._reset_selection()
self.eventhandler = ButtonListEventHandler(self)
if confirm_action:
	if not confirm_args:
		pass
	buttons[0].connect(confirm_action, *confirm_args)
return None
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb770a0ac>}
nname: 0
n 0(None)[return self._text
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb770a12c>}
nname: 125
n 125(None)[self._ConfirmWindow__selected = initial_selection
return None
]:
	i: 47(), 78(JA), 105(JA), 120(), 123(AE)
	o: 

nname: 123
n 123(None)[]:
	i: 61(f)
	o: 125(AE)

nname: 120
n 120(None)[]:
	i: 118(AE)
	o: 125()

nname: 118
n 118(None)[]:
	i: 95(f)
	o: 120(AE)

nname: 105
n 105(None)[initial_selection = None
]:
	i: 95(t)
	o: 125(JA)

nname: 95
n 95(<dummy_ex3> EXC_MATCH IndexError)[]:
	i: 71(except)
	o: 105(t), 118(f)

nname: 78
n 78(None)[initial_selection = self.buttons[0]
]:
	i: 71(try)
	o: 125(JA)

nname: 71
n 71(None)[]:
	i: 61(t)
	o: 78(try), 95(except)

nname: 61
n 61(<dummy_ex3> EXC_MATCH IndexError)[]:
	i: 0(except)
	o: 71(t), 123(f)

nname: 47
n 47(None)[del _[1]
]:
	i: 3(AF), 43()
	o: 125()

nname: 43
n 43(None)[]:
	i: 20(f), 32()
	o: 47()

nname: 32
n 32(None)[continue
]:
	i: 20(t)
	o: 43()

nname: 20
n 20(but.selected)[for but in self.buttons:
]:
	i: 3(for)
	o: 32(t), 43(f)

nname: 3
n 3(None)[]:
	i: 0(try)
	o: 20(for), 47(AF)

nname: 0
n 0(None)[]:
	i: 
	o: 3(try), 61(except)

nname: 125
n 125(None)[self._ConfirmWindow__selected = initial_selection
return None
]:
	i: 47(), 78(JA), 105(JA), 123(AE), 95(f), 118(AE)
	o: 

nname: 123
n 123(None)[]:
	i: 61(f)
	o: 125(AE)

nname: 105
n 105(None)[initial_selection = None
]:
	i: 95(t)
	o: 125(JA)

nname: 95
n 95(<dummy_ex3> EXC_MATCH IndexError)[]:
	i: 71(except)
	o: 105(t), 125(f)

nname: 78
n 78(None)[initial_selection = self.buttons[0]
]:
	i: 71(try)
	o: 125(JA)

nname: 71
n 71(None)[]:
	i: 61(t)
	o: 78(try), 95(except)

nname: 61
n 61(<dummy_ex3> EXC_MATCH IndexError)[]:
	i: 0(except)
	o: 71(t), 123(f)

nname: 47
n 47(None)[del _[1]
]:
	i: 3(AF), 20()
	o: 125()

nname: 20
n 20(None)[for but in self.buttons:
if but.selected:
	continue
]:
	i: 3(for)
	o: 47()

nname: 3
n 3(None)[]:
	i: 0(try)
	o: 20(for), 47(AF)

nname: 0
n 0(None)[]:
	i: 
	o: 3(try), 61(except)

nname: 125
n 125(None)[self._ConfirmWindow__selected = initial_selection
return None
]:
	i: 47(), 123(AE), 78(f)
	o: 

nname: 78
n 78(None)[try:
	initial_selection = self.buttons[0]
except IndexError:
	initial_selection = None
]:
	i: 61(f), 61(t)
	o: 125(JA)

nname: 61
n 61(<dummy_ex3> EXC_MATCH IndexError)[]:
	i: 0(except)
	o: 78(f)

nname: 47
n 47(None)[del _[1]
]:
	i: 3(AF), 20()
	o: 125()

nname: 20
n 20(None)[for but in self.buttons:
if but.selected:
	continue
]:
	i: 3(for)
	o: 47()

nname: 3
n 3(None)[]:
	i: 0(try)
	o: 20(for), 47(AF)

nname: 0
n 0(None)[]:
	i: 
	o: 3(try), 61(except)

structureSingleExcept Exception 'NoneType' object has no attribute 'toNode'
nname: 125
n 125(None)[self._ConfirmWindow__selected = initial_selection
return None
]:
	i: 47(), 123(AE), 78(f)
	o: 

nname: 78
n 78(None)[try:
	initial_selection = self.buttons[0]
except IndexError:
	initial_selection = None
]:
	i: 61(t), 0(except)
	o: 125(JA)

nname: 47
n 47(None)[del _[1]
]:
	i: 3(AF), 20()
	o: 125()

nname: 20
n 20(None)[for but in self.buttons:
if but.selected:
	continue
]:
	i: 3(for)
	o: 47()

nname: 3
n 3(None)[]:
	i: 0(try)
	o: 20(for), 47(AF)

nname: 0
n 0(None)[]:
	i: 
	o: 3(try), 78(except)

nname: 125
n 125(None)[self._ConfirmWindow__selected = initial_selection
return None
]:
	i: 47(), 78(f)
	o: 

nname: 78
n 78(None)[except:
	try:
		initial_selection = self.buttons[0]
	except IndexError:
		initial_selection = None
]:
	i: 61(t), 0()
	o: 125(JA)

nname: 47
n 47(None)[del _[1]
]:
	i: 0(AF), 20()
	o: 125()

nname: 20
n 20(None)[for but in self.buttons:
if but.selected:
	continue
]:
	i: 0(for)
	o: 47()

nname: 0
n 0(None)[try:
	pass
]:
	i: 
	o: 20(for), 47(AF), 78()

self.nodes: {0: <unpyclib.structure.node instance at 0xb77033ac>, 125: <unpyclib.structure.node instance at 0xb77031ec>, 78: <unpyclib.structure.node instance at 0xb770340c>, 47: <unpyclib.structure.node instance at 0xb770a70c>, 20: <unpyclib.structure.node instance at 0xb770318c>}
nname: 0
n 0(None)[return self._ConfirmWindow__selected
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb770342c>}
nname: 155
n 155(None)[self._ConfirmWindow__selected = val
return None
]:
	i: 130(), 139()
	o: 

nname: 139
n 139(None)[self.buttons[new_sel_idx].selected = True
]:
	i: 98(), 137(AE)
	o: 155()

nname: 137
n 137(None)[]:
	i: 120(f)
	o: 139(AE)

nname: 130
n 130(None)[]:
	i: 120(t)
	o: 155()

nname: 120
n 120(<dummy_ex3> EXC_MATCH ValueError)[]:
	i: 95(except)
	o: 130(t), 137(f)

nname: 98
n 98(None)[new_sel_idx = self.buttons.index(val)
]:
	i: 95(try)
	o: 139()

nname: 95
n 95(None)[]:
	i: 74(), 94()
	o: 98(try), 120(except)

nname: 94
n 94(None)[]:
	i: 53(f)
	o: 95()

nname: 74
n 74(None)[self.buttons[old_sel_idx].selected = False
]:
	i: 53(t)
	o: 95()

nname: 53
n 53(None not in (self._ConfirmWindow__selected, old_sel_idx))[]:
	i: 3(), 38(), 51(AE)
	o: 74(t), 94(f)

nname: 51
n 51(None)[]:
	i: 28(f)
	o: 53(AE)

nname: 38
n 38(None)[old_sel_idx = None
]:
	i: 28(t)
	o: 53()

nname: 28
n 28(<dummy_ex3> EXC_MATCH ValueError)[]:
	i: 0(except)
	o: 38(t), 51(f)

nname: 3
n 3(None)[old_sel_idx = self.buttons.index(self._ConfirmWindow__selected)
]:
	i: 0(try)
	o: 53()

nname: 0
n 0(None)[]:
	i: 
	o: 3(try), 28(except)

nname: 155
n 155(None)[self._ConfirmWindow__selected = val
return None
]:
	i: 139(), 120(f), 120(t)
	o: 

nname: 120
n 120(<dummy_ex3> EXC_MATCH ValueError)[]:
	i: 95(except)
	o: 155(f)

nname: 139
n 139(None)[self.buttons[new_sel_idx].selected = True
]:
	i: 98(), 137(AE)
	o: 155()

nname: 98
n 98(None)[new_sel_idx = self.buttons.index(val)
]:
	i: 95(try)
	o: 139()

nname: 95
n 95(None)[]:
	i: 28()
	o: 98(try), 120(except)

structureSingleExcept Exception 'NoneType' object has no attribute 'toNode'
nname: 28
n 28(None)[except ValueError:
	old_sel_idx = None
if None not in (self._ConfirmWindow__selected, old_sel_idx):
	self.buttons[old_sel_idx].selected = False
]:
	i: 0()
	o: 95()

nname: 0
n 0(None)[try:
	old_sel_idx = self.buttons.index(self._ConfirmWindow__selected)
]:
	i: 
	o: 28()

nname: 155
n 155(None)[self._ConfirmWindow__selected = val
return None
]:
	i: 139(), 120(t), 95(except)
	o: 

nname: 139
n 139(None)[self.buttons[new_sel_idx].selected = True
]:
	i: 98(), 137(AE)
	o: 155()

nname: 98
n 98(None)[new_sel_idx = self.buttons.index(val)
]:
	i: 95(try)
	o: 139()

nname: 95
n 95(None)[]:
	i: 0()
	o: 98(try), 155(except)

nname: 0
n 0(None)[try:
	old_sel_idx = self.buttons.index(self._ConfirmWindow__selected)
except ValueError:
	old_sel_idx = None
if None not in (self._ConfirmWindow__selected, old_sel_idx):
	self.buttons[old_sel_idx].selected = False
]:
	i: 
	o: 95()

nname: 155
n 155(None)[except:
	self._ConfirmWindow__selected = val
	return None
]:
	i: 139(), 120(t), 0(except)
	o: 

nname: 139
n 139(None)[self.buttons[new_sel_idx].selected = True
]:
	i: 98(), 137(AE)
	o: 155()

nname: 98
n 98(None)[new_sel_idx = self.buttons.index(val)
]:
	i: 0(try)
	o: 139()

nname: 0
n 0(None)[try:
	old_sel_idx = self.buttons.index(self._ConfirmWindow__selected)
except ValueError:
	old_sel_idx = None
if None not in (self._ConfirmWindow__selected, old_sel_idx):
	self.buttons[old_sel_idx].selected = False
]:
	i: 
	o: 98(try), 155(except)

self.nodes: {0: <unpyclib.structure.node instance at 0xb7703e2c>, 98: <unpyclib.structure.node instance at 0xb770a18c>, 137: <unpyclib.structure.node instance at 0xb770af8c>, 139: <unpyclib.structure.node instance at 0xb770ad4c>, 155: <unpyclib.structure.node instance at 0xb770aaec>}
nname: 6
n 6(None)[__doc__ = '\n    A simple window showing a text and two buttons for the user to choose\n    from. In most cases this window is used to ask the user if an action\n    should really be performed.\n    '
type = 'confirm'
def __init__(self, text='', buttons=None, confirm_action=None, confirm_args=()):
	Window.__init__(self)
	if buttons is None:
		buttons = [Button(_('Yes'), True), Button(_('No'), False)]
	self._text = text
	self.buttons = buttons
	self._reset_selection()
	self.eventhandler = ButtonListEventHandler(self)
	if confirm_action:
		if not confirm_args:
			pass
		buttons[0].connect(confirm_action, *confirm_args)
	return None

def _get_text(self):
	return self._text

_set_text = gui_updater()
text = property(_get_text, _set_text)
del _get_text
del _set_text
def _reset_selection(self):
	try:
		pass

def _get_selected(self):
	return self._ConfirmWindow__selected

def _set_selected(self, val):
	try:
		old_sel_idx = self.buttons.index(self._ConfirmWindow__selected)
	except ValueError:
		old_sel_idx = None
	if None not in (self._ConfirmWindow__selected, old_sel_idx):
		self.buttons[old_sel_idx].selected = False

selected = property(_get_selected, _set_selected)
del _get_selected
del _set_selected
]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb76feb2c>}
nname: 0
n 0(None)[ConfirmWindow.__init__(self, text, buttons, confirm_action, confirm_args)
self.eventhandler = DismissableButtonListEventHandler(self)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76fed0c>}
nname: 6
n 6(None)[type = 'bigconfirm'
def __init__(self, text='', buttons=None, confirm_action=None, confirm_args=()):
	ConfirmWindow.__init__(self, text, buttons, confirm_action, confirm_args)
	self.eventhandler = DismissableButtonListEventHandler(self)

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb76fe58c>}
nname: 0
n 0(None)[from __future__ import absolute_import
__all__ = ['ConfirmWindow']
from .core import Window, Button, gui_updater
from pygui.eventmanager.windows import ButtonListEventHandler, DismissableButtonListEventHandler
class ConfirmWindow(Window):
	__doc__ = '\n    A simple window showing a text and two buttons for the user to choose\n    from. In most cases this window is used to ask the user if an action\n    should really be performed.\n    '
	type = 'confirm'
	def __init__(self, text='', buttons=None, confirm_action=None, confirm_args=()):
		Window.__init__(self)
		if buttons is None:
			buttons = [Button(_('Yes'), True), Button(_('No'), False)]
		self._text = text
		self.buttons = buttons
		self._reset_selection()
		self.eventhandler = ButtonListEventHandler(self)
		if confirm_action:
			if not confirm_args:
				pass
			buttons[0].connect(confirm_action, *confirm_args)
		return None

	def _get_text(self):
		return self._text

	_set_text = gui_updater()
	text = property(_get_text, _set_text)
	del _get_text
	del _set_text
	def _reset_selection(self):
		try:
			pass

	def _get_selected(self):
		return self._ConfirmWindow__selected

	def _set_selected(self, val):
		try:
			old_sel_idx = self.buttons.index(self._ConfirmWindow__selected)
		except ValueError:
			old_sel_idx = None
		if None not in (self._ConfirmWindow__selected, old_sel_idx):
			self.buttons[old_sel_idx].selected = False

	selected = property(_get_selected, _set_selected)
	del _get_selected
	del _set_selected


class BigConfirmWindow(ConfirmWindow):
	type = 'bigconfirm'
	def __init__(self, text='', buttons=None, confirm_action=None, confirm_args=()):
		ConfirmWindow.__init__(self, text, buttons, confirm_action, confirm_args)
		self.eventhandler = DismissableButtonListEventHandler(self)



]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76f7b6c>}
from __future__ import absolute_import
__all__ = ['ConfirmWindow']
from .core import Window, Button, gui_updater
from pygui.eventmanager.windows import ButtonListEventHandler, DismissableButtonListEventHandler
class ConfirmWindow(Window):
	__doc__ = '\n    A simple window showing a text and two buttons for the user to choose\n    from. In most cases this window is used to ask the user if an action\n    should really be performed.\n    '
	type = 'confirm'
	def __init__(self, text='', buttons=None, confirm_action=None, confirm_args=()):
		Window.__init__(self)
		if buttons is None:
			buttons = [Button(_('Yes'), True), Button(_('No'), False)]
		self._text = text
		self.buttons = buttons
		self._reset_selection()
		self.eventhandler = ButtonListEventHandler(self)
		if confirm_action:
			if not confirm_args:
				pass
			buttons[0].connect(confirm_action, *confirm_args)
		return None

	def _get_text(self):
		return self._text

	_set_text = gui_updater()
	text = property(_get_text, _set_text)
	del _get_text
	del _set_text
	def _reset_selection(self):
		try:
			pass

	def _get_selected(self):
		return self._ConfirmWindow__selected

	def _set_selected(self, val):
		try:
			old_sel_idx = self.buttons.index(self._ConfirmWindow__selected)
		except ValueError:
			old_sel_idx = None
		if None not in (self._ConfirmWindow__selected, old_sel_idx):
			self.buttons[old_sel_idx].selected = False

	selected = property(_get_selected, _set_selected)
	del _get_selected
	del _set_selected


class BigConfirmWindow(ConfirmWindow):
	type = 'bigconfirm'
	def __init__(self, text='', buttons=None, confirm_action=None, confirm_args=()):
		ConfirmWindow.__init__(self, text, buttons, confirm_action, confirm_args)
		self.eventhandler = DismissableButtonListEventHandler(self)



